﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace SheepCultivation.Common.Migrations
{
    /// <inheritdoc />
    public partial class _121212 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Absrtacts",
                columns: table => new
                {
                    AbsrtactId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    AbsrtactName = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Absrtacts", x => x.AbsrtactId);
                });

            migrationBuilder.CreateTable(
                name: "Accountingunits",
                columns: table => new
                {
                    AccountingunitId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    AccountingunitName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Pid = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Accountingunits", x => x.AccountingunitId);
                });

            migrationBuilder.CreateTable(
                name: "Appearances",
                columns: table => new
                {
                    AppearanceId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    BreedingSheepArchiveId = table.Column<int>(type: "int", nullable: false),
                    Sexs = table.Column<int>(type: "int", nullable: false),
                    AppearancesDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    AppearancesAge = table.Column<int>(type: "int", nullable: false),
                    Teeth = table.Column<int>(type: "int", nullable: false),
                    AppearancesHair = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AppearancesPigmentation = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AppearancesHoofColor = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AppearancesMouthColor = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Horns = table.Column<int>(type: "int", nullable: false),
                    Distribution = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Appearances", x => x.AppearanceId);
                });

            migrationBuilder.CreateTable(
                name: "Appointment",
                columns: table => new
                {
                    AppointmentId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    DepartmentId = table.Column<int>(type: "int", nullable: false),
                    Superior = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    DepartmentHead = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    InchargeHead = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    FinanceHead = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsSee = table.Column<int>(type: "int", nullable: false),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Appointment", x => x.AppointmentId);
                });

            migrationBuilder.CreateTable(
                name: "BasicInformation",
                columns: table => new
                {
                    BreedingSheepArchiveId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Auricle = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    SheepbreedId = table.Column<int>(type: "int", nullable: false),
                    CorpuscleAuricle = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    GeneLV = table.Column<int>(type: "int", nullable: false),
                    SheepTypeId = table.Column<int>(type: "int", nullable: false),
                    BuildingId = table.Column<int>(type: "int", nullable: false),
                    ColumnsId = table.Column<int>(type: "int", nullable: false),
                    SheepSex = table.Column<int>(type: "int", nullable: false),
                    SheepStatus = table.Column<int>(type: "int", nullable: false),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_BasicInformation", x => x.BreedingSheepArchiveId);
                });

            migrationBuilder.CreateTable(
                name: "BirthMessage",
                columns: table => new
                {
                    BirthMessageId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    BreedingSheepArchiveId = table.Column<int>(type: "int", nullable: false),
                    DadBreedingSheepArchiveId = table.Column<int>(type: "int", nullable: false),
                    MomBreedingSheepArchiveId = table.Column<int>(type: "int", nullable: false),
                    BirthDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    AdmissionDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    BirthAdd = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BirthWeight = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BirthStatusId = table.Column<int>(type: "int", nullable: false),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_BirthMessage", x => x.BirthMessageId);
                });

            migrationBuilder.CreateTable(
                name: "BirthStatus",
                columns: table => new
                {
                    BirthStatusId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    BirthStatusName = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_BirthStatus", x => x.BirthStatusId);
                });

            migrationBuilder.CreateTable(
                name: "Body",
                columns: table => new
                {
                    BodyId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    EarsId = table.Column<int>(type: "int", nullable: false),
                    Sexs = table.Column<int>(type: "int", nullable: false),
                    BodyDaysAge = table.Column<int>(type: "int", nullable: false),
                    BodyDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    BodyHeight = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    BodyLong = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    BodyShort = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    BodyPipe = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    BodyScrotal = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    BodyBackfat = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    BodyEye = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    BodyEyeWeight = table.Column<decimal>(type: "decimal(18,2)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Body", x => x.BodyId);
                });

            migrationBuilder.CreateTable(
                name: "Building",
                columns: table => new
                {
                    BuildingId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    BuildingTypeId = table.Column<int>(type: "int", nullable: false),
                    BuildingName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BuildingPerson = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BuildingStaff = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    BuildingState = table.Column<int>(type: "int", nullable: false),
                    BuildingRenamk = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Building", x => x.BuildingId);
                });

            migrationBuilder.CreateTable(
                name: "BuildingsRecordEnter",
                columns: table => new
                {
                    EnterId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    BreedingSheepArchiveId = table.Column<int>(type: "int", nullable: false),
                    BuildingId = table.Column<int>(type: "int", nullable: false),
                    EnterDate = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_BuildingsRecordEnter", x => x.EnterId);
                });

            migrationBuilder.CreateTable(
                name: "BuildingsRecordOut",
                columns: table => new
                {
                    OutId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    BreedingSheepArchiveId = table.Column<int>(type: "int", nullable: false),
                    BuildingId = table.Column<int>(type: "int", nullable: false),
                    OutDate = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_BuildingsRecordOut", x => x.OutId);
                });

            migrationBuilder.CreateTable(
                name: "BuildingType",
                columns: table => new
                {
                    BuildingTypeId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    BuildingTypeName = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_BuildingType", x => x.BuildingTypeId);
                });

            migrationBuilder.CreateTable(
                name: "Buyer",
                columns: table => new
                {
                    BuyerId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    BuyerName = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Buyer", x => x.BuyerId);
                });

            migrationBuilder.CreateTable(
                name: "City",
                columns: table => new
                {
                    CityId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    CityName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ProvinceId = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_City", x => x.CityId);
                });

            migrationBuilder.CreateTable(
                name: "Client",
                columns: table => new
                {
                    ClientId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ClientName = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Client", x => x.ClientId);
                });

            migrationBuilder.CreateTable(
                name: "ClientManage",
                columns: table => new
                {
                    ManageId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ClientNo = table.Column<int>(type: "int", nullable: false),
                    ClientType = table.Column<int>(type: "int", nullable: false),
                    Phone = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Name = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Card = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ProvinceId = table.Column<int>(type: "int", nullable: false),
                    Addresses = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Industry = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Sharp = table.Column<int>(type: "int", nullable: false),
                    Mnemonic = table.Column<int>(type: "int", nullable: false),
                    File = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Stage = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    UseStatus = table.Column<int>(type: "int", nullable: false),
                    Products = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CooperateDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    Affiliation = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    UsageStatus = table.Column<int>(type: "int", nullable: false),
                    ClientId = table.Column<int>(type: "int", nullable: false),
                    CustomerLevel = table.Column<int>(type: "int", nullable: false),
                    Desc = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    MarketId = table.Column<int>(type: "int", nullable: false),
                    SalesmanId = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ClientManage", x => x.ManageId);
                });

            migrationBuilder.CreateTable(
                name: "Columns",
                columns: table => new
                {
                    ColumnsId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    BuildingId = table.Column<int>(type: "int", nullable: false),
                    BreedingSheepArchiveId = table.Column<int>(type: "int", nullable: false),
                    ColumnsName = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Columns", x => x.ColumnsId);
                });

            migrationBuilder.CreateTable(
                name: "County",
                columns: table => new
                {
                    CountyId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    CountyName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CityId = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_County", x => x.CountyId);
                });

            migrationBuilder.CreateTable(
                name: "CustomerLevel",
                columns: table => new
                {
                    CustomerLevelId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    CustomerLevelName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ClientId = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_CustomerLevel", x => x.CustomerLevelId);
                });

            migrationBuilder.CreateTable(
                name: "Department",
                columns: table => new
                {
                    DepartmentId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    DepartmentNext = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    DepartmentName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    DepartmentIsNot = table.Column<int>(type: "int", nullable: false),
                    DepartmentTypeId = table.Column<int>(type: "int", nullable: false),
                    DepartmentNum = table.Column<int>(type: "int", nullable: false),
                    DepartmentAdd = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Department", x => x.DepartmentId);
                });

            migrationBuilder.CreateTable(
                name: "DepartmentType",
                columns: table => new
                {
                    DepartmentTypeId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    DepartmentTypeName = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_DepartmentType", x => x.DepartmentTypeId);
                });

            migrationBuilder.CreateTable(
                name: "Depot",
                columns: table => new
                {
                    DepotId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    DepotName = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Depot", x => x.DepotId);
                });

            migrationBuilder.CreateTable(
                name: "Descendent",
                columns: table => new
                {
                    DescendentId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    breedingSheepArchiveId = table.Column<int>(type: "int", nullable: false),
                    TransplantingDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    BuildingsEnter = table.Column<int>(type: "int", nullable: false),
                    ColumnsEnter = table.Column<int>(type: "int", nullable: false),
                    BuildingId = table.Column<int>(type: "int", nullable: false),
                    ColumnsId = table.Column<int>(type: "int", nullable: false),
                    Sex = table.Column<int>(type: "int", nullable: false),
                    Age = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Descendent", x => x.DescendentId);
                });

            migrationBuilder.CreateTable(
                name: "Employee",
                columns: table => new
                {
                    EmployeeId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    FirstName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Gender = table.Column<bool>(type: "bit", nullable: true),
                    IdType = table.Column<int>(type: "int", nullable: true),
                    IdNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    PhoneNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Email = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    University = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    EducationLevel = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Company = table.Column<int>(type: "int", nullable: true),
                    EmploymentStatus = table.Column<int>(type: "int", nullable: true),
                    Department = table.Column<int>(type: "int", nullable: true),
                    EntryDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    ProbationDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    JobTitle = table.Column<int>(type: "int", nullable: true),
                    Position = table.Column<int>(type: "int", nullable: true),
                    HrLevel = table.Column<int>(type: "int", nullable: true),
                    Account = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Password = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Employee", x => x.EmployeeId);
                });

            migrationBuilder.CreateTable(
                name: "Enterprise",
                columns: table => new
                {
                    EnterpriseId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    EnterpriseName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Enterpriseillustrate = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    EnterpriseLogo = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IndustryId1 = table.Column<int>(type: "int", nullable: false),
                    IndustryId2 = table.Column<int>(type: "int", nullable: false),
                    ProvinceId = table.Column<int>(type: "int", nullable: false),
                    CityId = table.Column<int>(type: "int", nullable: false),
                    CountyId = table.Column<int>(type: "int", nullable: false),
                    FullAddress = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    EnterprisePhone = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Unifiedsocialcode = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Description = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Deactivated = table.Column<bool>(type: "bit", nullable: false),
                    Head = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    FinanceHead = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ApartHead = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    MyProperty = table.Column<int>(type: "int", nullable: false),
                    AccountingunitId1 = table.Column<int>(type: "int", nullable: false),
                    AccountingunitId2 = table.Column<int>(type: "int", nullable: false),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Enterprise", x => x.EnterpriseId);
                });

            migrationBuilder.CreateTable(
                name: "EnterPriseTree",
                columns: table => new
                {
                    EnterPriseTreeId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    unitName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Pid = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_EnterPriseTree", x => x.EnterPriseTreeId);
                });

            migrationBuilder.CreateTable(
                name: "FemalePeriodic",
                columns: table => new
                {
                    FemalePeriodicId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    FemalePeriodicReceiptNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    FemalePeriodicPeriodicDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    FemalePeriodicSerialNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    BreedingSheepArchiveId = table.Column<int>(type: "int", nullable: false),
                    BuildingId = table.Column<int>(type: "int", nullable: false),
                    ColumnsId = table.Column<int>(type: "int", nullable: false),
                    TransferDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    FemalePeriodicWeight = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_FemalePeriodic", x => x.FemalePeriodicId);
                });

            migrationBuilder.CreateTable(
                name: "Industry",
                columns: table => new
                {
                    IndustryId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    IndustryName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Pid = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Industry", x => x.IndustryId);
                });

            migrationBuilder.CreateTable(
                name: "Lamb",
                columns: table => new
                {
                    LambId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    BreedingSheepArchiveId = table.Column<int>(type: "int", nullable: false),
                    LambSex = table.Column<int>(type: "int", nullable: false),
                    BuildingId = table.Column<int>(type: "int", nullable: false),
                    ColumnsId = table.Column<int>(type: "int", nullable: false),
                    BuildingsEnter = table.Column<int>(type: "int", nullable: false),
                    ColumnsEnter = table.Column<int>(type: "int", nullable: false),
                    Heavy = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Lamb", x => x.LambId);
                });

            migrationBuilder.CreateTable(
                name: "MalePeriodic",
                columns: table => new
                {
                    MalePeriodicId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    MalePeriodicReceiptNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    MalePeriodicPeriodicDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    MalePeriodicSerialNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    BreedingSheepArchiveId = table.Column<int>(type: "int", nullable: false),
                    BuildingId = table.Column<int>(type: "int", nullable: false),
                    ColumnsId = table.Column<int>(type: "int", nullable: false),
                    MalePeriodicNumber = table.Column<int>(type: "int", nullable: false),
                    MalePeriodicWeight = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_MalePeriodic", x => x.MalePeriodicId);
                });

            migrationBuilder.CreateTable(
                name: "Market",
                columns: table => new
                {
                    MarketId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    MarketName = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Market", x => x.MarketId);
                });

            migrationBuilder.CreateTable(
                name: "Parturition",
                columns: table => new
                {
                    ParturitionId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    BreedingSheepArchiveId = table.Column<int>(type: "int", nullable: false),
                    ParturitionNode = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ParturitionDay = table.Column<int>(type: "int", nullable: false),
                    BuildingId = table.Column<int>(type: "int", nullable: false),
                    ColumnsId = table.Column<int>(type: "int", nullable: false),
                    ParturitionDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    ParturitionDelivery = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Parturition", x => x.ParturitionId);
                });

            migrationBuilder.CreateTable(
                name: "PendingPrompts",
                columns: table => new
                {
                    PendingPromptsId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    BreedingSheepArchiveId = table.Column<int>(type: "int", nullable: false),
                    EmptyDay = table.Column<int>(type: "int", nullable: false),
                    Transfer = table.Column<int>(type: "int", nullable: false),
                    ColumnsId = table.Column<int>(type: "int", nullable: false),
                    BreedsStatus = table.Column<bool>(type: "bit", nullable: false),
                    BreedsDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    PromptName = table.Column<int>(type: "int", nullable: false),
                    SheepId = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_PendingPrompts", x => x.PendingPromptsId);
                });

            migrationBuilder.CreateTable(
                name: "Pregnancy",
                columns: table => new
                {
                    PregnancyId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    BreedingSheepArchiveId = table.Column<int>(type: "int", nullable: false),
                    PregnancyDay = table.Column<int>(type: "int", nullable: false),
                    BuildingId = table.Column<int>(type: "int", nullable: false),
                    ColumnsId = table.Column<int>(type: "int", nullable: false),
                    PregnancyName = table.Column<int>(type: "int", nullable: false),
                    SheepId = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Pregnancy", x => x.PregnancyId);
                });

            migrationBuilder.CreateTable(
                name: "ProgenyFile",
                columns: table => new
                {
                    ProgenyFileId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    BreedingSheepArchiveId = table.Column<int>(type: "int", nullable: false),
                    ProgenyAuricle = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ProgenyCorpuscleAuricle = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    DadBreedingSheepArchiveId = table.Column<int>(type: "int", nullable: false),
                    MomBreedingSheepArchiveId = table.Column<int>(type: "int", nullable: false),
                    SheepbreedId = table.Column<int>(type: "int", nullable: false),
                    ProgenySex = table.Column<int>(type: "int", nullable: false),
                    BirthStatusId = table.Column<int>(type: "int", nullable: false),
                    BirthDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    EntranceDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    BirthAddreess = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    BirthWeight = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    GeneLV = table.Column<int>(type: "int", nullable: false),
                    SheepTypeId = table.Column<int>(type: "int", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    BuildingId = table.Column<int>(type: "int", nullable: false),
                    ColumnsId = table.Column<int>(type: "int", nullable: false),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ProgenyFile", x => x.ProgenyFileId);
                });

            migrationBuilder.CreateTable(
                name: "ProgenyPeriodic",
                columns: table => new
                {
                    ProgenyPeriodicId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ProgenyPeriodicReceiptNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ProgenyPeriodicPeriodicDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    BreedingSheepArchiveId = table.Column<int>(type: "int", nullable: false),
                    ProgenyPeriodicSavNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    BuildingId = table.Column<int>(type: "int", nullable: false),
                    ProgenyPeriodicStage = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ColumnsId = table.Column<int>(type: "int", nullable: false),
                    ProgenyPeriodicNumber = table.Column<int>(type: "int", nullable: false),
                    ProgenyPeriodicWeight = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ProgenyPeriodic", x => x.ProgenyPeriodicId);
                });

            migrationBuilder.CreateTable(
                name: "Province",
                columns: table => new
                {
                    ProvinceId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ProvinceName = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Province", x => x.ProvinceId);
                });

            migrationBuilder.CreateTable(
                name: "Salesman",
                columns: table => new
                {
                    SalesmanId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SalesmanName = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Salesman", x => x.SalesmanId);
                });

            migrationBuilder.CreateTable(
                name: "Sheepbreed",
                columns: table => new
                {
                    SheepbreedId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SheepbreedName = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Sheepbreed", x => x.SheepbreedId);
                });

            migrationBuilder.CreateTable(
                name: "SheepBuy",
                columns: table => new
                {
                    SheepBuyId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    BreedingSheepArchiveId = table.Column<int>(type: "int", nullable: false),
                    BuildingId = table.Column<int>(type: "int", nullable: false),
                    ColumnsId = table.Column<int>(type: "int", nullable: false),
                    Sex = table.Column<int>(type: "int", nullable: false),
                    GoodName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Unit = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Num = table.Column<int>(type: "int", nullable: false),
                    Price = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    Amount = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    Settlement = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    Weight = table.Column<int>(type: "int", nullable: false),
                    BuyerId = table.Column<int>(type: "int", nullable: false),
                    Category = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    AbsrtactId = table.Column<int>(type: "int", nullable: false),
                    BuyDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    AccountingunitId = table.Column<int>(type: "int", nullable: false),
                    Numberes = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SheepTypesId = table.Column<int>(type: "int", nullable: false),
                    VendorId = table.Column<int>(type: "int", nullable: false),
                    SerialNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DepotId = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SheepBuy", x => x.SheepBuyId);
                });

            migrationBuilder.CreateTable(
                name: "SheepChildbirth",
                columns: table => new
                {
                    SheepChildbirthId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SheepChildbirthPersonal = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SheepChildbirthDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    SheepChildbirthReceiptNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SheepChildbirthSerialNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SheepChildbirthEarNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SheepChildbirthPregnancyDay = table.Column<int>(type: "int", nullable: false),
                    ChildbirthState = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SheepBatch = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Maternity = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Galactosis = table.Column<int>(type: "int", nullable: false),
                    Mastitis = table.Column<int>(type: "int", nullable: false),
                    NestNum = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    NestNumWeight = table.Column<int>(type: "int", nullable: false),
                    SheepGender = table.Column<bool>(type: "bit", nullable: false),
                    HouseName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HouseNumber = table.Column<int>(type: "int", nullable: false),
                    TurnHouseName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    TurnHouseNumber = table.Column<int>(type: "int", nullable: false),
                    SheepChildbirthInformation = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false),
                    HealthSheepNum = table.Column<int>(type: "int", nullable: false),
                    WeakSheepNum = table.Column<int>(type: "int", nullable: false),
                    MalformedSheepNum = table.Column<int>(type: "int", nullable: false),
                    DieSheepNum = table.Column<int>(type: "int", nullable: false),
                    MummySheepNum = table.Column<int>(type: "int", nullable: false),
                    MonsterSheepNum = table.Column<int>(type: "int", nullable: false),
                    LiveSheepNum = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SheepChildbirth", x => x.SheepChildbirthId);
                });

            migrationBuilder.CreateTable(
                name: "Sheepfarm",
                columns: table => new
                {
                    SheepfarmId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SheepfarmName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    SheepfarmSimpleName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    SheepfarmscaleId = table.Column<int>(type: "int", nullable: false),
                    ProviceId = table.Column<int>(type: "int", nullable: false),
                    CityId = table.Column<int>(type: "int", nullable: false),
                    CountyId = table.Column<int>(type: "int", nullable: false),
                    Fulladdress = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CreateBooksDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    SheepfarmHead = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    DepartmentId = table.Column<int>(type: "int", nullable: false),
                    IsOpen = table.Column<int>(type: "int", nullable: false),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Sheepfarm", x => x.SheepfarmId);
                });

            migrationBuilder.CreateTable(
                name: "Sheepfarmscale",
                columns: table => new
                {
                    SheepfarmscaleId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SheepfarmscaleName = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Sheepfarmscale", x => x.SheepfarmscaleId);
                });

            migrationBuilder.CreateTable(
                name: "SheepHistory",
                columns: table => new
                {
                    SheepHistoryId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SheepHistoryFemaleEarNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SheepHistoryDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    SheepHistoryMaleEarNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SheepHistoryPregnancyDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    SheepHistoryPregnancyResult = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SheepHistoryChildbirthDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    LiveSheepWeight = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    FetusTimeNum = table.Column<int>(type: "int", nullable: false),
                    WeaningDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    WeaningNum = table.Column<int>(type: "int", nullable: false),
                    WeaningLitterWeight = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    WeaningLitterInformation = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false),
                    HealthSheepNum = table.Column<int>(type: "int", nullable: false),
                    WeakSheepNum = table.Column<int>(type: "int", nullable: false),
                    MalformedSheepNum = table.Column<int>(type: "int", nullable: false),
                    DieSheepNum = table.Column<int>(type: "int", nullable: false),
                    MummySheepNum = table.Column<int>(type: "int", nullable: false),
                    MonsterSheepNum = table.Column<int>(type: "int", nullable: false),
                    LiveSheepNum = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SheepHistory", x => x.SheepHistoryId);
                });

            migrationBuilder.CreateTable(
                name: "SheepHybridization",
                columns: table => new
                {
                    SheepHybridizationId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SheepHybridizationPersonal = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SheepHybridizationReceiptNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SheepHybridizationSerialNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SheepHybridizationEarNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    FirstRam = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SheepHybridizationWay = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    FemaleHeat = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    FirstGrade = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    HouseName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HouseNumber = table.Column<int>(type: "int", nullable: false),
                    TurnHouseName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    TurnHouseNumber = table.Column<int>(type: "int", nullable: false),
                    BreedState = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    EventDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    Weight = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    SheepHybridizationInformation = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SheepHybridization", x => x.SheepHybridizationId);
                });

            migrationBuilder.CreateTable(
                name: "SheepInfo",
                columns: table => new
                {
                    SheepInfoId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    BreedingSheepArchiveId = table.Column<int>(type: "int", nullable: false),
                    TransferDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    SheepType = table.Column<int>(type: "int", nullable: false),
                    BuildingId = table.Column<int>(type: "int", nullable: false),
                    SheepAge = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    BreedingBugles = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Parity = table.Column<int>(type: "int", nullable: false),
                    WeanedDate = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SheepInfo", x => x.SheepInfoId);
                });

            migrationBuilder.CreateTable(
                name: "SheepPregnancy",
                columns: table => new
                {
                    SheepPregnancyId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SheepPregnancyPersonal = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SheepPregnancyDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    SheepPregnancyReceiptNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SheepPregnancySerialNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SheepPregnancyEarNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SheepPregnancyResult = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SheepPregnancyWay = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    TwinsNum = table.Column<int>(type: "int", nullable: false),
                    SheepPregnancyDays = table.Column<int>(type: "int", nullable: false),
                    HouseName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HouseNumber = table.Column<int>(type: "int", nullable: false),
                    TurnHouseName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    TurnHouseNumber = table.Column<int>(type: "int", nullable: false),
                    SheepPregnancyInformation = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SheepPregnancy", x => x.SheepPregnancyId);
                });

            migrationBuilder.CreateTable(
                name: "SheepSale",
                columns: table => new
                {
                    SheepSaleId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    BreedingSheepArchiveId = table.Column<int>(type: "int", nullable: false),
                    SoldPrice = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    Pricing = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    Discount = table.Column<int>(type: "int", nullable: false),
                    Rank = table.Column<int>(type: "int", nullable: false),
                    SheepbreedId = table.Column<int>(type: "int", nullable: false),
                    Sex = table.Column<int>(type: "int", nullable: false),
                    SheepTypesId = table.Column<int>(type: "int", nullable: false),
                    ReproductiveState = table.Column<int>(type: "int", nullable: false),
                    BuildingId = table.Column<int>(type: "int", nullable: false),
                    ColumnsId = table.Column<int>(type: "int", nullable: false),
                    BirthDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    BirthWeight = table.Column<int>(type: "int", nullable: false),
                    Weight = table.Column<int>(type: "int", nullable: false),
                    FatherNumber = table.Column<int>(type: "int", nullable: false),
                    MotherNumber = table.Column<int>(type: "int", nullable: false),
                    MonthAge = table.Column<int>(type: "int", nullable: false),
                    SaleDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    DepotId = table.Column<int>(type: "int", nullable: false),
                    ClientId = table.Column<int>(type: "int", nullable: false),
                    Addresses = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    SalesmanId = table.Column<int>(type: "int", nullable: false),
                    Numberes = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DepartmentId = table.Column<int>(type: "int", nullable: false),
                    SerialNumber = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SheepSale", x => x.SheepSaleId);
                });

            migrationBuilder.CreateTable(
                name: "SheepWeaning",
                columns: table => new
                {
                    SheepWeaningId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SheepWeaningPersonal = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SheepWeaningDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    SheepWeaningReceiptNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SheepWeaningSerialNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SheepWeaningEarNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SheepWeaningBreastfeedingDays = table.Column<int>(type: "int", nullable: false),
                    HouseName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HouseNumber = table.Column<int>(type: "int", nullable: false),
                    TurnHouseName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    TurnHouseNumber = table.Column<int>(type: "int", nullable: false),
                    SheepWeaningNum = table.Column<int>(type: "int", nullable: false),
                    SheepWeaningWeight = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    SheepWeaningFemaleWeight = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    SheepWeaningInformation = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SheepWeaning", x => x.SheepWeaningId);
                });

            migrationBuilder.CreateTable(
                name: "SheepWeighed",
                columns: table => new
                {
                    SheepWeighedId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SheepWeighedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    BreedingSheepArchiveId = table.Column<int>(type: "int", nullable: false),
                    Sexs = table.Column<int>(type: "int", nullable: false),
                    SheepWeighedType = table.Column<int>(type: "int", nullable: false),
                    SheepWeighedHeight = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    SheepWeighedAge = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SheepWeighed", x => x.SheepWeighedId);
                });

            migrationBuilder.CreateTable(
                name: "Supplier",
                columns: table => new
                {
                    SupplierId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SupplierNo = table.Column<int>(type: "int", nullable: false),
                    SupplierType = table.Column<int>(type: "int", nullable: false),
                    Phone = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Name = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    SupplierName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Card = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ProvinceId = table.Column<int>(type: "int", nullable: false),
                    Addresses = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Industry = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Sharp = table.Column<int>(type: "int", nullable: false),
                    Mnemonic = table.Column<int>(type: "int", nullable: false),
                    Vendor = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Flats = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    UseStatus = table.Column<int>(type: "int", nullable: false),
                    Desc = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    MarketId = table.Column<int>(type: "int", nullable: false),
                    SalesmanId = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Supplier", x => x.SupplierId);
                });

            migrationBuilder.CreateTable(
                name: "Transfer",
                columns: table => new
                {
                    TransferId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    BreedingSheepArchiveId = table.Column<int>(type: "int", nullable: false),
                    BuildingsOut = table.Column<int>(type: "int", nullable: false),
                    ColumnsOut = table.Column<int>(type: "int", nullable: false),
                    BuildingsEnter = table.Column<int>(type: "int", nullable: false),
                    ColumnsEnter = table.Column<int>(type: "int", nullable: false),
                    SheepvarietyId = table.Column<int>(type: "int", nullable: false),
                    TransferSex = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Transfer", x => x.TransferId);
                });

            migrationBuilder.CreateTable(
                name: "User",
                columns: table => new
                {
                    UserId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    UserName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Password = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    UserImg = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_User", x => x.UserId);
                });

            migrationBuilder.CreateTable(
                name: "Variety",
                columns: table => new
                {
                    SheepvarietyId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SheepvarietyName = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Variety", x => x.SheepvarietyId);
                });

            migrationBuilder.CreateTable(
                name: "Vendor",
                columns: table => new
                {
                    VendorId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    VendorName = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Vendor", x => x.VendorId);
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Absrtacts");

            migrationBuilder.DropTable(
                name: "Accountingunits");

            migrationBuilder.DropTable(
                name: "Appearances");

            migrationBuilder.DropTable(
                name: "Appointment");

            migrationBuilder.DropTable(
                name: "BasicInformation");

            migrationBuilder.DropTable(
                name: "BirthMessage");

            migrationBuilder.DropTable(
                name: "BirthStatus");

            migrationBuilder.DropTable(
                name: "Body");

            migrationBuilder.DropTable(
                name: "Building");

            migrationBuilder.DropTable(
                name: "BuildingsRecordEnter");

            migrationBuilder.DropTable(
                name: "BuildingsRecordOut");

            migrationBuilder.DropTable(
                name: "BuildingType");

            migrationBuilder.DropTable(
                name: "Buyer");

            migrationBuilder.DropTable(
                name: "City");

            migrationBuilder.DropTable(
                name: "Client");

            migrationBuilder.DropTable(
                name: "ClientManage");

            migrationBuilder.DropTable(
                name: "Columns");

            migrationBuilder.DropTable(
                name: "County");

            migrationBuilder.DropTable(
                name: "CustomerLevel");

            migrationBuilder.DropTable(
                name: "Department");

            migrationBuilder.DropTable(
                name: "DepartmentType");

            migrationBuilder.DropTable(
                name: "Depot");

            migrationBuilder.DropTable(
                name: "Descendent");

            migrationBuilder.DropTable(
                name: "Employee");

            migrationBuilder.DropTable(
                name: "Enterprise");

            migrationBuilder.DropTable(
                name: "EnterPriseTree");

            migrationBuilder.DropTable(
                name: "FemalePeriodic");

            migrationBuilder.DropTable(
                name: "Industry");

            migrationBuilder.DropTable(
                name: "Lamb");

            migrationBuilder.DropTable(
                name: "MalePeriodic");

            migrationBuilder.DropTable(
                name: "Market");

            migrationBuilder.DropTable(
                name: "Parturition");

            migrationBuilder.DropTable(
                name: "PendingPrompts");

            migrationBuilder.DropTable(
                name: "Pregnancy");

            migrationBuilder.DropTable(
                name: "ProgenyFile");

            migrationBuilder.DropTable(
                name: "ProgenyPeriodic");

            migrationBuilder.DropTable(
                name: "Province");

            migrationBuilder.DropTable(
                name: "Salesman");

            migrationBuilder.DropTable(
                name: "Sheepbreed");

            migrationBuilder.DropTable(
                name: "SheepBuy");

            migrationBuilder.DropTable(
                name: "SheepChildbirth");

            migrationBuilder.DropTable(
                name: "Sheepfarm");

            migrationBuilder.DropTable(
                name: "Sheepfarmscale");

            migrationBuilder.DropTable(
                name: "SheepHistory");

            migrationBuilder.DropTable(
                name: "SheepHybridization");

            migrationBuilder.DropTable(
                name: "SheepInfo");

            migrationBuilder.DropTable(
                name: "SheepPregnancy");

            migrationBuilder.DropTable(
                name: "SheepSale");

            migrationBuilder.DropTable(
                name: "SheepWeaning");

            migrationBuilder.DropTable(
                name: "SheepWeighed");

            migrationBuilder.DropTable(
                name: "Supplier");

            migrationBuilder.DropTable(
                name: "Transfer");

            migrationBuilder.DropTable(
                name: "User");

            migrationBuilder.DropTable(
                name: "Variety");

            migrationBuilder.DropTable(
                name: "Vendor");
        }
    }
}
